package com.example.animations.dialogs;

import android.content.Context;
import android.os.Bundle;
import android.widget.Button;

import androidx.appcompat.app.AppCompatDialog;

import com.example.animations.R;

public class MainDialog extends AppCompatDialog {
    public MainDialog(Context context) {
        super(context);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_main);

        setTitle("This is Alert");
        setCanceledOnTouchOutside(false);

        ((Button) findViewById(R.id.destructive_button)).setOnClickListener(l -> dismiss());
        ((Button) findViewById(R.id.none_button)).setOnClickListener(l -> dismiss());
        ((Button) findViewById(R.id.cancel_button)).setOnClickListener(l -> dismiss());
    }
}
